package com.hicorp.segment.pojo.po;

import com.alibaba.fastjson.JSONObject;
import com.hicorp.segment.pojo.BaseNoDO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import tk.mybatis.mapper.entity.IDynamicTableName;

import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
public class Receipts extends BaseNoDO implements IDynamicTableName {

    private JSONObject idJson;

    private String remark;

    private String receiptsType;

    private String noHand;

    private String invalid;

    private String tableNameSub;

    private String authorityCode;

    private String queryCode;


    @Transient
    private String tableName;

    @Transient
    private List<ReceiptsSub> receiptsSub;

    //以下用于搜索的临时字段
    @Transient
    private Date createGmtStart;

    @Transient
    private Date createGmtEnd;

    @Transient
    private Date modifiedGmtStart;

    @Transient
    private Date modifiedGmtEnd;

    @Override
    public String getDynamicTableName() {
        return tableName;
    }

    public Receipts() {
    }

    public Receipts(String tableName) {
        this.tableName = tableName;
    }
    public Receipts(String name ,JSONObject jsonObject) {
        this.setName(name);this.idJson = jsonObject;
    }
}
